﻿using System;
using System.Linq;
using System.Linq.Expressions;

namespace Idte.Core.Infrastructure.Repository
{
    public interface IRepository<TEntity> where TEntity : class
    {
        IQueryable<TEntity> GetAll();
        IQueryable<TEntity> Get(Expression<Func<TEntity, bool>> predicate);
        void Insert(TEntity entity);
        TEntity Update(TEntity entity, Expression<Func<TEntity, bool>> predicate);
        void Delete(TEntity entity);
    }
}
